/**
 * @Date 2020-06-23 18:16:46
 * @Remark
 */

export interface AccountDto {
  gmtCreate: string;
  menuList: null;
  permissionList: null;
  sysUserId: string;
  sysUserName: string;
}

export interface Account {
  id: string;
  username: string;
  gmtCreate: string;
  menuList: [];
  permissionList: [];
}

export const BLANK_ACCOUNT: Account = {
  id: "",
  username: "",
  gmtCreate: "",
  menuList: [],
  permissionList: [],
};

export function getAccountByDto(dto: AccountDto) {
  const result: Account = {
    id: dto.sysUserId,
    username: dto.sysUserName,
    gmtCreate: dto.gmtCreate,
    menuList: [],
    permissionList: [],
  };
  return result;
}
